﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using DataServices.Model;
using System.Configuration;

namespace DataServices.Services
{
    public class CategoryServices : DBServices
    {

        public CategoryServices()
            : base()
        {
        }

        /// <summary>
        /// create an category
        /// </summary>
        /// <param name="c">Category Model</param>
        /// <returns>ID of category was inserted</returns>
        /// 
        public int create(Category c)
        {
            c.LastUpdate = DateTime.Now;
            this.Categories.Add(c);
            return c.ID;
        }
    }
}
